package net.neptech.listener;

import lombok.extern.slf4j.Slf4j;
import net.neptech.model.dto.AppointmentDTO;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.support.Acknowledgment;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class DltListeners {



    @KafkaListener(topics = "slot_use_update-dlt", groupId = "dlt-consumer")
    public void handleDlt(ConsumerRecord<String, Object> record, Acknowledgment ack) {
        // 这里做记录、报警、人工处理等
        ack.acknowledge();
        System.out.println("DLT value=" + record.value() + ", headers=" + record.headers());
    }



}
